<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Jetson Inference: Utilities Library (jetson-utils)</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="NVLogo_2D.jpg"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Jetson Inference
   </div>
   <div id="projectbrief">DNN Vision Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__util.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#groups">Modules</a> &#124;
<a href="#nested-classes">Classes</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Utilities Library (jetson-utils)</div>  </div>
</div><!--header-->
<div class="contents">

<p>Tools and utilities for camera streaming, codecs, display, and visualization.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="groups"></a>
Modules</h2></td></tr>
<tr class="memitem:group__camera"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__camera.html">Camera Capture</a></td></tr>
<tr class="memdesc:group__camera"><td class="mdescLeft">&#160;</td><td class="mdescRight">Camera capture and streaming for MIPI CSI and V4L2 devices. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:group__codec"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__codec.html">Codec</a></td></tr>
<tr class="memdesc:group__codec"><td class="mdescLeft">&#160;</td><td class="mdescRight">Hardware-accelerated video encoder and decoder (H.264/H.265) using GStreamer. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:group__cuda"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cuda.html">CUDA</a></td></tr>
<tr class="memdesc:group__cuda"><td class="mdescLeft">&#160;</td><td class="mdescRight">CUDA utilities and image processing kernels. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:group__OpenGL"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__OpenGL.html">OpenGL</a></td></tr>
<tr class="memdesc:group__OpenGL"><td class="mdescLeft">&#160;</td><td class="mdescRight">OpenGL textures and display window (X11/GLX). <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:group__image"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__image.html">Image I/O</a></td></tr>
<tr class="memdesc:group__image"><td class="mdescLeft">&#160;</td><td class="mdescRight">Loading and saving image files from disk. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:group__input"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__input.html">Input</a></td></tr>
<tr class="memdesc:group__input"><td class="mdescLeft">&#160;</td><td class="mdescRight">HID input devices including gamepad controllers, joysticks, and keyboard. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:group__matrix"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__matrix.html">Matrix</a></td></tr>
<tr class="memdesc:group__matrix"><td class="mdescLeft">&#160;</td><td class="mdescRight">3x3 matrix operations from <code><a class="el" href="mat33_8h.html">mat33.h</a></code> <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:group__threads"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__threads.html">Multithreading</a></td></tr>
<tr class="memdesc:group__threads"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="classMutex.html" title="A lightweight mutual exclusion lock. ">Mutex</a>, events, threads, and process objects based on pthreads. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:group__filesystem"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__filesystem.html">Filesystem</a></td></tr>
<tr class="memdesc:group__filesystem"><td class="mdescLeft">&#160;</td><td class="mdescRight">network Networking TCP/UDP sockets and IP address manipulation. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:group__time"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__time.html">Time</a></td></tr>
<tr class="memdesc:group__time"><td class="mdescLeft">&#160;</td><td class="mdescRight">Timestamping operations for measuring the timing of CPU code. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommandLine.html">commandLine</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Command line parser class.  <a href="classcommandLine.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:ga4b8b2bed986c06c207ebac140ba65a7a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__util.html#ga4b8b2bed986c06c207ebac140ba65a7a">SAFE_DELETE</a>(x)&#160;&#160;&#160;if(x != NULL) { delete x; x = NULL; }</td></tr>
<tr class="memdesc:ga4b8b2bed986c06c207ebac140ba65a7a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check for non-NULL pointer before deleting it, and then set the pointer to NULL.  <a href="#ga4b8b2bed986c06c207ebac140ba65a7a">More...</a><br /></td></tr>
<tr class="separator:ga4b8b2bed986c06c207ebac140ba65a7a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga598a3330b3c21701223ee0ca14316eca"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__util.html#ga598a3330b3c21701223ee0ca14316eca">PI</a>&#160;&#160;&#160;3.1415926535897932384626433832795f</td></tr>
<tr class="memdesc:ga598a3330b3c21701223ee0ca14316eca"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constant representing PI.  <a href="#ga598a3330b3c21701223ee0ca14316eca">More...</a><br /></td></tr>
<tr class="separator:ga598a3330b3c21701223ee0ca14316eca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3b947f4b635461030ff2d87833e5049e"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__util.html#ga3b947f4b635461030ff2d87833e5049e">TWO_PI</a>&#160;&#160;&#160;6.283185307179586476925286766559f</td></tr>
<tr class="memdesc:ga3b947f4b635461030ff2d87833e5049e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constant representing two PI.  <a href="#ga3b947f4b635461030ff2d87833e5049e">More...</a><br /></td></tr>
<tr class="separator:ga3b947f4b635461030ff2d87833e5049e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gadadbae7d9856635bbacdc4c9f546ef81"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__util.html#gadadbae7d9856635bbacdc4c9f546ef81">PI_OVER_TWO</a>&#160;&#160;&#160;1.5707963267948966192313216916398f;</td></tr>
<tr class="memdesc:gadadbae7d9856635bbacdc4c9f546ef81"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constant representing PI over two.  <a href="#gadadbae7d9856635bbacdc4c9f546ef81">More...</a><br /></td></tr>
<tr class="separator:gadadbae7d9856635bbacdc4c9f546ef81"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga212460e743fecb084d717bb2180c5a56"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__util.html#ga212460e743fecb084d717bb2180c5a56">DEG_TO_RAD</a>&#160;&#160;&#160;0.017453292519943295769236907684886f</td></tr>
<tr class="memdesc:ga212460e743fecb084d717bb2180c5a56"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constant for converting from degrees to radians.  <a href="#ga212460e743fecb084d717bb2180c5a56">More...</a><br /></td></tr>
<tr class="separator:ga212460e743fecb084d717bb2180c5a56"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga89e47af0449640d4f15191aba5ca24c6"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__util.html#ga89e47af0449640d4f15191aba5ca24c6">RAD_TO_DEG</a>&#160;&#160;&#160;57.295779513082320876798154814105f</td></tr>
<tr class="memdesc:ga89e47af0449640d4f15191aba5ca24c6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constant for converting from radians to degrees.  <a href="#ga89e47af0449640d4f15191aba5ca24c6">More...</a><br /></td></tr>
<tr class="separator:ga89e47af0449640d4f15191aba5ca24c6"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gafee76bb8d269f1ccb369264fd28540f6"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__util.html#gafee76bb8d269f1ccb369264fd28540f6">randf</a> (float range_min=0.0f, float range_max=1.0f)</td></tr>
<tr class="memdesc:gafee76bb8d269f1ccb369264fd28540f6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Generate a floating-point random number within the specified range.  <a href="#gafee76bb8d269f1ccb369264fd28540f6">More...</a><br /></td></tr>
<tr class="separator:gafee76bb8d269f1ccb369264fd28540f6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga38e36f1fb5c8d8bc2dd5b502f17d9be4"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__util.html#ga38e36f1fb5c8d8bc2dd5b502f17d9be4">rand</a> (int range_min, int range_max)</td></tr>
<tr class="memdesc:ga38e36f1fb5c8d8bc2dd5b502f17d9be4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Generate a random integer within the specified range.  <a href="#ga38e36f1fb5c8d8bc2dd5b502f17d9be4">More...</a><br /></td></tr>
<tr class="separator:ga38e36f1fb5c8d8bc2dd5b502f17d9be4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga37406669812e75c559cfa401d0c2f623"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__util.html#ga37406669812e75c559cfa401d0c2f623">srand_time</a> ()</td></tr>
<tr class="memdesc:ga37406669812e75c559cfa401d0c2f623"><td class="mdescLeft">&#160;</td><td class="mdescRight">Seed the random number generator based on the system time.  <a href="#ga37406669812e75c559cfa401d0c2f623">More...</a><br /></td></tr>
<tr class="separator:ga37406669812e75c559cfa401d0c2f623"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>Tools and utilities for camera streaming, codecs, display, and visualization. </p>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a id="ga212460e743fecb084d717bb2180c5a56"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga212460e743fecb084d717bb2180c5a56">&#9670;&nbsp;</a></span>DEG_TO_RAD</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DEG_TO_RAD&#160;&#160;&#160;0.017453292519943295769236907684886f</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Constant for converting from degrees to radians. </p>

</div>
</div>
<a id="ga598a3330b3c21701223ee0ca14316eca"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga598a3330b3c21701223ee0ca14316eca">&#9670;&nbsp;</a></span>PI</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define PI&#160;&#160;&#160;3.1415926535897932384626433832795f</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Constant representing PI. </p>

</div>
</div>
<a id="gadadbae7d9856635bbacdc4c9f546ef81"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gadadbae7d9856635bbacdc4c9f546ef81">&#9670;&nbsp;</a></span>PI_OVER_TWO</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define PI_OVER_TWO&#160;&#160;&#160;1.5707963267948966192313216916398f;</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Constant representing PI over two. </p>

</div>
</div>
<a id="ga89e47af0449640d4f15191aba5ca24c6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga89e47af0449640d4f15191aba5ca24c6">&#9670;&nbsp;</a></span>RAD_TO_DEG</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define RAD_TO_DEG&#160;&#160;&#160;57.295779513082320876798154814105f</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Constant for converting from radians to degrees. </p>

</div>
</div>
<a id="ga4b8b2bed986c06c207ebac140ba65a7a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga4b8b2bed986c06c207ebac140ba65a7a">&#9670;&nbsp;</a></span>SAFE_DELETE</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SAFE_DELETE</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">x</td><td>)</td>
          <td>&#160;&#160;&#160;if(x != NULL) { delete x; x = NULL; }</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Check for non-NULL pointer before deleting it, and then set the pointer to NULL. </p>

</div>
</div>
<a id="ga3b947f4b635461030ff2d87833e5049e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga3b947f4b635461030ff2d87833e5049e">&#9670;&nbsp;</a></span>TWO_PI</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define TWO_PI&#160;&#160;&#160;6.283185307179586476925286766559f</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Constant representing two PI. </p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga38e36f1fb5c8d8bc2dd5b502f17d9be4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga38e36f1fb5c8d8bc2dd5b502f17d9be4">&#9670;&nbsp;</a></span>rand()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int rand </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>range_min</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>range_max</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Generate a random integer within the specified range. </p>

</div>
</div>
<a id="gafee76bb8d269f1ccb369264fd28540f6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gafee76bb8d269f1ccb369264fd28540f6">&#9670;&nbsp;</a></span>randf()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">float randf </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>range_min</em> = <code>0.0f</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>range_max</em> = <code>1.0f</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Generate a floating-point random number within the specified range. </p>

</div>
</div>
<a id="ga37406669812e75c559cfa401d0c2f623"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga37406669812e75c559cfa401d0c2f623">&#9670;&nbsp;</a></span>srand_time()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void srand_time </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Seed the random number generator based on the system time. </p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated on Fri Jun 21 2019 16:23:15 for Jetson Inference by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>
